import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from "axios";
import {MessageBox,Dialog, Pagination,DatePicker,CheckboxGroup,Checkbox,Table, tableColumn, RadioButton,RadioGroup,Radio, Button, Message,Form, FormItem,Input,Select,Option,Dropdown,DropdownMenu,DropdownItem,Steps,Step,Cascader,CascaderPanel} from "element-ui";

Vue.use(Button);
Vue.use(Form);
Vue.use(FormItem);
Vue.use(Input);
Vue.use(Dropdown);
Vue.use(DropdownMenu);
Vue.use(DropdownItem);
Vue.use(Select);
Vue.use(Option);
Vue.use(Steps);
Vue.use(Step);
Vue.use(Cascader);
Vue.use(CascaderPanel);
Vue.use(Radio);
Vue.use(RadioGroup);
Vue.use(RadioButton);
Vue.use(Checkbox);
Vue.use(CheckboxGroup);
Vue.use(Table);
Vue.use(tableColumn);
Vue.use(DatePicker);
Vue.use(Pagination);
Vue.use(Dialog);
Vue.prototype.$message = Message;
Vue.prototype.$confirm = MessageBox.confirm;
Vue.config.productionTip = false

axios.interceptors.request.use(
	function(request) {
		request.headers["Content-Type"] = 'application/x-www-form-urlencoded'
		return request;
	},
	function(error) {
		return Promise.reject(error);
	}
);
axios.interceptors.response.use(
	function(response) {
		return response;
	},
	function(error) {
		return Promise.reject(error);
	}
);

Vue.prototype.$http = axios;
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
